<?php 
  $db=JFactory::getDbo();
  $query="select * from #__webminar";
  $db->setQuery($query);
  $row=$db->loadObjectList();
  $article = JUtility::getArticle(146);
?>
<div id="custom-page-heading">
	<h1 class="heading"><?php echo $article->title;?></h1>
</div>


<div class="col-4 col-last">
      <?php echo $article->introtext;?>
      <div class="table-webminar">
            <table id="webminar-table">
                <tr>
                    <th width="20%">Title</th>
                    <th width="20%">Webinar</th>
                    <th width="20%">Date</th>
                    <th width="20%">Time</th>
                    <th width="10%">Description</th>
                    <th width="10%">Register</th>
                </tr>
                <?php for($i = 0; $i < count($row); $i++){ ?>
                <tr class="<?php if($i%2==0) echo 'tr-odd'?>">
                    <td width="20%"><?php echo $row[$i]->title ?></td>
                    <td width="20%"><?php echo $row[$i]->webminars ?></td>
                    <td width="20%">
                      <?php 
                       $month=substr($row[$i]->date,5,2);
                       $day=substr($row[$i]->date,8,2);
                       $year=substr($row[$i]->date,0,4);
                       $data_webinar= $day ."-" . $month ."-" .$year;
                       echo $data_webinar; 
                      ?>
                    </td>
                    <td width="20%"><?php echo $row[$i]->time ?></td>
                    
                    <td width="10%">
                        <div class="eW-d">
                            <a href="#" class="btnWebminar-info">Info</a>
                            <p class="p-info">
                             <?php echo $row[$i]->description  ?>
                            </p>
                        </div>
                    </td>
                    <td width="10%">
                        <a href="index.php?option=com_content&view=article&id=124&Itemid=224&id_webinar=<?php echo $row[$i]->id ?>" class="btnWebminar-register">Sign up</a>
                    </td>
                </tr>
             
                <?php } ?>
            </table>
        </div>
    </div>
<?php

return;/**
 * @package		Joomla.Site
 * @subpackage	com_newsfeeds
 * @copyright	Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');

?>
<div class="categories-list<?php echo $this->pageclass_sfx;?>">
<?php if ($this->params->get('show_page_heading')) : ?>
<h1>
	<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>

	<?php if ($this->params->get('show_base_description')) : ?>
	<?php 	//If there is a description in the menu parameters use that; ?>
	       		<?php if($this->params->get('categories_description')) : ?>
		 <div class="category-desc base-desc">
			<?php echo  JHtml::_('content.prepare', $this->params->get('categories_description'), '', 'com_newsfeeds.categories'); ?>
			</div>
		<?php  else: ?>
			<?php //Otherwise get one from the database if it exists. ?>
			<?php  if ($this->parent->description) : ?>
				<div class="category-desc  base-desc">
					<?php  echo JHtml::_('content.prepare', $this->parent->description, '', 'com_newsfeeds.categories'); ?>
				</div>
			<?php  endif; ?>
		<?php  endif; ?>
	<?php endif; ?>
<?php
echo $this->loadTemplate('items');
?>
</div>
